import request from '@/utils/request'

// 查询扣款记录列表
export function listDeduction(query) {
  return request({
    url: '/sl/deduction/list',
    method: 'get',
    params: query
  })
}

// 查询扣款记录详细
export function getDeduction(deductionId) {
  return request({
    url: '/sl/deduction/' + deductionId,
    method: 'get'
  })
}

// 新增扣款记录
export function addDeduction(data) {
  return request({
    url: '/sl/deduction',
    method: 'post',
    data: data
  })
}

// 修改扣款记录
export function updateDeduction(data) {
  return request({
    url: '/sl/deduction',
    method: 'put',
    data: data
  })
}

// 删除扣款记录
export function delDeduction(deductionId) {
  return request({
    url: '/sl/deduction/' + deductionId,
    method: 'delete'
  })
}
